#!/usr/bin/python
# -*- coding: utf-8 -*-

def move(n, a, b, c):

    if n == 1:

        print(a, '-->', b)

    else:

        move(n - 1, a, c, b)

        print(a, '-->', b)

        move(n - 1, c, b, a)

move(3,'a','b','c')
    